<?php

namespace app\game\controller;
use cmf\controller\UserBaseController;
use think\Db;
use think\Request;
/**
 * 订单逻辑处理
 *
 * @author sipeng
 */
class OrderhandlerController extends UserBaseController{
	public function getUnfinishedOrderListForGameList(){
		$params = Request::instance()->param();
		$user = Db::name('user_token')->where('token', $params['token'])->find();
		$orderList = Db::name('game_build')->where(['user_id'=>$user['user_id'], 'order_status'=>0])->select();
		$this->result($orderList,1,'请求成功','json',[], 'status');
	}

	public function getUnfinishedOrderListForServerList(){
		$params = Request::instance()->param();
		$user = Db::name('user_token')->where('token', $params['token'])->find();
		$orderList = Db::name('server')->where(['user_id'=>$user['user_id'], 'order_status'=>0])->select();
		$this->result($orderList,1,'请求成功','json',[], 'status');	
	}
}